<div class="myDiv">
  <button type="button" class="add border-bottom" (click)="goto()">追加</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  <a  [title]="'用户表复制' "
  [routerLink]="'/usertable'">用户表复制 </a>

  <ngx-datatable class="material striped" [rows]="users" [columns]="columns" [footerHeight]="45" [headerHeight]="40"
    [columnMode]="'force'" (activate)="choose($event)" rowHeight="auto">
    <ngx-datatable-column name="id">
      <ng-template let-column="row" ngx-datatable-header-template>
        <span>No</span>
      </ng-template>
      <ng-template let-row="row" ngx-datatable-cell-template>
        <span>{{row.id}}</span> 
      </ng-template>
    </ngx-datatable-column>

    <ngx-datatable-column name="name">
      <ng-template let-column="row" ngx-datatable-header-template>
        <span>名前</span>
      </ng-template>
      <ng-template let-row="row" ngx-datatable-cell-template>
        <span> {{row.name}}</span>
      </ng-template>
    </ngx-datatable-column>


    <ngx-datatable-column name="sex">
      <ng-template let-column="row" ngx-datatable-header-template>
        <span>性别</span>
      </ng-template>
      <ng-template let-row="row" ngx-datatable-cell-template>
        <span> {{row.sex==1? '男' : '女'}}</span>
      </ng-template>
    </ngx-datatable-column>


    <ngx-datatable-column name="addr">
      <ng-template let-column="row" ngx-datatable-header-template>
        <span>住所</span>
      </ng-template>
      <ng-template let-row="row" ngx-datatable-cell-template>
        <span> {{row.addr}}</span>
      </ng-template>
    </ngx-datatable-column>


    <!-- 底部 -->
    <ngx-datatable-footer>
      <ng-template ngx-datatable-footer-template>
        <div style="margin-left:25%; text-align: center; width: 100%; ">
          当前页码：{{currentpage}} &nbsp; &nbsp;
          本页：{{thispage}}条数据&nbsp;&nbsp;
          共计：{{totalrow}}条数据
        </div>
        <!-- [size]="thispage"   每页多少条 -->
        <!--  [page]="currentpage" 当前页 -->
        <datatable-pager [pagerLeftArrowIcon]="'datatable-icon-left'" [pagerRightArrowIcon]="'datatable-icon-right'"
          [pagerPreviousIcon]="'datatable-icon-prev'" [pagerNextIcon]="'datatable-icon-skip'" [page]="currentpage"
          [size]="thispage" [count]="totalrow" (change)="change($event)">
        </datatable-pager>
      </ng-template>
    </ngx-datatable-footer>
  </ngx-datatable>
</div>